﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Aadopt.aspx.cs" Inherits="pufflesweb.admin.Aadopt" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
                <div>
            <asp:TextBox ID="TextBox1" placeholder="请输入工号" runat="server"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Text="搜索" />

            <br />
            <br />
            <table   align="center" border="1">
                <tr><td>领养申请ID</td><%--<td>领养用户ID</td><td>领养救助狗ID</td>--%><td>申请时间</td><td>用户真实姓名</td><td>经济状况</td><td>陪伴时间</td><td>领养意愿</td><td>救助地址</td><td>手机号码</td><td>微信号</td><td>QQ号</td><td>审批</td><td>操作</td></tr>

                <%
                    string id = Request.QueryString["TID"];
                    if (id != null)
                    {
                        PBLL.Adopt.del(int.Parse(id));
                        PF.JsHelper.AlertAndRedirect("删除成功", "Aadpot.aspx");
                    }

                    List<PModel.Adopt> list = PBLL.Adopt.list();
                    %>
                <% for (int i = 0; i < list.Count; i++)
                    {
                        string money = "";
                        if(list[i].Tcheck == 0)
                        {
                            money = "500元";
                        }
                        else if(list[i].Tcheck  == 1)
                        {
                            money = "1000元";
                        }
                        else if(list[i].Tcheck  == 2)
                        {
                            money = "1500元";
                        }
                        else if(list[i].Tcheck  == 3)
                        {
                            money = "2000元";
                        }
                        else if(list[i].Tcheck  == 4)
                        {
                            money = "2000元以上";
                        }

                        string usetime = "";
                        if(list[i].Tcheck == 0)
                        {
                            usetime = "7小时";
                        }
                        else if(list[i].Tcheck  == 1)
                        {
                            usetime = "10小时";
                        }
                        else if(list[i].Tcheck  == 2)
                        {
                            usetime = "15小时";
                        }
                        else if(list[i].Tcheck  == 3)
                        {
                            usetime = "20小时";
                        }
                        else if(list[i].Tcheck  == 4)
                        {
                            usetime = "20小时以上";
                        }

                        string check = "";
                        if(list[i].Tcheck == 0)
                        {
                            check = "未审核";
                        }
                        else if(list[i].Tcheck  == 1)
                        {
                            check = "审核通过";
                        }
                        else if(list[i].Tcheck  == 2)
                        {
                            check = "审核不通过";
                        }

                        %>

                <tr><td><%=list[i].TID%></td>
                    <%--<td><% =list[i].User.UID%></td>
                    <td><% =list[i].Help.HID%></td>--%>
                    <td><%=list[i].Ttime%></td>
                    <td><%=list[i].Tname%></td>
                    <td><%=money%></td>
                    <td><%=usetime%></td>
                    <td><%=list[i].Ttext%></td>
                    <td><%=list[i].Taddress%>"</td>
                    <td><%=list[i].Temail%></td>
                    <td><%=list[i].Tphone%></td>
                    <td><%=list[i].Twechat%></td>
                    <td><%=list[i].Tqq%></td>
                    <td><a href="Aadopt.aspx?TID=<%=list[i].TID%>">删除 </a> | <a href="Aadoptcheck.aspx?TID=<%=list[i].TID%>"><%=check%></a></td></tr>
                <%} %>

            </table>
        </div>
    </form>
</body>
</html>
